package it.slkfarm.adapter;


import it.slkfarm.android.R;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TextView;

public class CropCacheView
{
	/**
	 * @uml.property  name="baseView"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	private View baseView;
	/**
	 * @uml.property  name="cropName"
	 * @uml.associationEnd  
	 */
	private TextView cropName;
	/**
	 * @uml.property  name="cultivarName"
	 * @uml.associationEnd  
	 */
	private TextView cultivarName;
	/**
	 * @uml.property  name="percentage"
	 * @uml.associationEnd  
	 */
	private TextView percentage;
	/**
	 * @uml.property  name="quantity"
	 * @uml.associationEnd  
	 */
	private TextView quantity;
	/**
	 * @uml.property  name="layout"
	 * @uml.associationEnd  
	 */
	private RelativeLayout layout;
	/**
	 * @uml.property  name="cropImage"
	 * @uml.associationEnd  
	 */
	private ImageView cropImage;
	/**
	 * @uml.property  name="seekBar"
	 * @uml.associationEnd  readOnly="true"
	 */
	private SeekBar seekBar;
	/**
	 * @uml.property  name="info"
	 * @uml.associationEnd  
	 */
	private ImageButton info;
	/**
	 * @uml.property  name="delete"
	 * @uml.associationEnd  
	 */
	private ImageButton delete;
	
	
	public CropCacheView(View v)
	{
		baseView = v;
	}
	
	public TextView getTextViewName () 
	{
		if (cropName == null) 
		{
			cropName = (TextView) baseView.findViewById(R.id.tvCropName);
		}
	
		return cropName;
	}
	
	public TextView getTextViewNameSummary () 
	{
		if (cropName == null) 
		{
			cropName = (TextView) baseView.findViewById(R.id.tvCropNameSummary);
		}
	
		return cropName;
	}
	
	public TextView getTextViewCultivar()
	{
		if (cultivarName == null)
		{
			cultivarName = (TextView) baseView.findViewById(R.id.tvCultivarName);
		}
	
		return cultivarName;
	}
	
	public TextView getTextViewCultivarSummary()
	{
		if (cultivarName == null)
		{
			cultivarName = (TextView) baseView.findViewById(R.id.tvCultivarNameSummary);
		}
	
		return cultivarName;
	}
	
	public TextView getTextViewPergentage()
	{
		if (percentage == null)
		{
			percentage = (TextView) baseView.findViewById(R.id.tvPercentage);
		}
	
		return percentage;
	}
	
	public TextView getTextViewQuantity()
	{
		if (quantity == null)
		{
			quantity = (TextView) baseView.findViewById(R.id.tvQuantity);
		}
	
		return quantity;
	}


	public ImageView getImageViewPhoto () 
	{
		if (cropImage == null) 
		{
			cropImage = (ImageView) baseView.findViewById(R.id.imageCrop);
		}
		return cropImage;
	}
	
	public ImageButton getInfoButton()
	{
		if (info == null)
		{
			info = (ImageButton) baseView.findViewById(R.id.btnInfo);
		}
		return info;
	}
	
	public ImageButton getDeleteButton()
	{
		if (delete == null)
		{
			delete = (ImageButton) baseView.findViewById(R.id.btnDelete);
		}
		return delete;
	}
	
	public ImageView getImageViewPhotoSummary () 
	{
		if (cropImage == null) 
		{
			cropImage = (ImageView) baseView.findViewById(R.id.imageCropSummary);
		}
		return cropImage;
	}	
	
	public RelativeLayout getRelativeLayout()
	{
		if (layout == null)
		{
			layout = (RelativeLayout) baseView.findViewById(R.id.layoutCropRow);
		}
		return layout;
	}
	
	public RelativeLayout getRelativeLayoutSummary()
	{
		if (layout == null)
		{
			layout = (RelativeLayout) baseView.findViewById(R.id.layoutCropRowSummary2);
		}
		return layout;
	}
}
